/**
 * 随机生成UUID(带分隔'-')
 * */
export function randomUUID () {
  const tempUrl = URL.createObjectURL(new Blob())
  // blob:https://xxx.com/b250d159-e1b6-4a87-9002-885d90033be3
  const uuid = tempUrl.toString().substring(tempUrl.lastIndexOf('/') + 1)
  URL.revokeObjectURL(tempUrl)
  return uuid
}

/**
 * 随机生成简化UUID(不带分隔'-')
 * */
export function randomSimpleUUID () {
  return randomUUID().replace('-', '')
}
